package edu.se.jai.lesson01.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "websocket.features")
public class FeatureConfig {
    private boolean strictOrigin = true;
    private boolean messageSizeLimit = true;
    private boolean rateLimit = true;
    private boolean idleTimeout = true;
    private boolean broadcast = true;
    private boolean metrics = true;

    // Getters and Setters
    public boolean isStrictOrigin() { return strictOrigin; }
    public void setStrictOrigin(boolean strictOrigin) { this.strictOrigin = strictOrigin; }

    public boolean isMessageSizeLimit() { return messageSizeLimit; }
    public void setMessageSizeLimit(boolean messageSizeLimit) { this.messageSizeLimit = messageSizeLimit; }

    public boolean isRateLimit() { return rateLimit; }
    public void setRateLimit(boolean rateLimit) { this.rateLimit = rateLimit; }

    public boolean isIdleTimeout() { return idleTimeout; }
    public void setIdleTimeout(boolean idleTimeout) { this.idleTimeout = idleTimeout; }

    public boolean isBroadcast() { return broadcast; }
    public void setBroadcast(boolean broadcast) { this.broadcast = broadcast; }



    public boolean isMetrics() { return metrics; }
    public void setMetrics(boolean metrics) { this.metrics = metrics; }
}
